|
1
|
|
|
/* |
|
2
|
|
|
* @copyright Copyright (c) 2016 Julius Härtl <[email protected]> |
|
3
|
|
|
* |
|
4
|
|
|
* @author Julius Härtl <[email protected]> |
|
5
|
|
|
* |
|
6
|
|
|
* @license GNU AGPL version 3 or any later version |
|
7
|
|
|
* |
|
8
|
|
|
* This program is free software: you can redistribute it and/or modify |
|
9
|
|
|
* it under the terms of the GNU Affero General Public License as |
|
10
|
|
|
* published by the Free Software Foundation, either version 3 of the |
|
11
|
|
|
* License, or (at your option) any later version. |
|
12
|
|
|
* |
|
13
|
|
|
* This program is distributed in the hope that it will be useful, |
|
14
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16
|
|
|
* GNU Affero General Public License for more details. |
|
17
|
|
|
* |
|
18
|
|
|
* You should have received a copy of the GNU Affero General Public License |
|
19
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
20
|
|
|
* |
|
21
|
|
|
*/ |
|
22
|
|
|
|
|
23
|
|
|
app.run(function ($document, $rootScope, $transitions) { |
|
24
|
|
|
'use strict'; |
|
25
|
|
|
$document.click(function (event) { |
|
26
|
|
|
$rootScope.$broadcast('documentClicked', event); |
|
27
|
|
|
}); |
|
28
|
|
|
$transitions.onEnter({to: 'board.card'}, function ($state, $transition$) { |
|
|
|
|
|
|
29
|
|
|
$rootScope.sidebar.show = true; |
|
30
|
|
|
}); |
|
31
|
|
|
$transitions.onEnter({to: 'board.detail'}, function ($state, $transition$) { |
|
|
|
|
|
|
32
|
|
|
$rootScope.sidebar.show = true; |
|
33
|
|
|
}); |
|
34
|
|
|
$transitions.onEnter({to: 'board'}, function ($state) { |
|
|
|
|
|
|
35
|
|
|
$rootScope.sidebar.show = false; |
|
36
|
|
|
}); |
|
37
|
|
|
$transitions.onExit({from: 'board.card'}, function ($state) { |
|
|
|
|
|
|
38
|
|
|
$rootScope.sidebar.show = false; |
|
39
|
|
|
}); |
|
40
|
|
|
$transitions.onExit({from: 'board.detail'}, function ($state) { |
|
|
|
|
|
|
41
|
|
|
$rootScope.sidebar.show = false; |
|
42
|
|
|
}); |
|
43
|
|
|
$transitions.onEnter({to: 'board.archive'}, function ($state) { |
|
|
|
|
|
|
44
|
|
|
//BoardController.loadArchived(); |
|
45
|
|
|
}); |
|
46
|
|
|
|
|
47
|
|
|
$('link[rel="shortcut icon"]').attr( |
|
48
|
|
|
'href', |
|
49
|
|
|
OC.filePath('deck', 'img', 'app-512.png') |
|
|
|
|
|
|
50
|
|
|
); |
|
51
|
|
|
|
|
52
|
|
|
}); |
|
53
|
|
|
|
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.